﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Comunicationdata.aspx.cs"
    Inherits="HQWeb.View.Order.Comunicationdata" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Styles/GridViewStyle.css" rel="Stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
        <asp:Label runat="server" ID="labcomu" Text="交流记录"></asp:Label>
    </div>
    <asp:GridView ID="GridView1" CssClass="GridViewStyle" runat="server" AutoGenerateColumns="False"
        PageSize="25" Width="100%" AllowPaging="True" CellPadding="4" EmptyDataText="没有数据记录！！"
        OnPageIndexChanging="GridView1_PageIndexChanging" GridLines="None">
        <Columns>
            <%--   <asp:BoundField DataField="Contents" HeaderText="内容" ItemStyle-Width="30%"/>--%>
            <asp:TemplateField HeaderText="内容" ItemStyle-Width="30%">
                <ItemTemplate>
                    <a href="javascript:void(0)" title='<%#Eval("Contents").ToString()%>'>
                        <%#Eval("Contents").ToString().Length>45?Eval("Contents").ToString().Substring(0,40)+".......":Eval("Contents").ToString()%></a>
                </ItemTemplate>
            </asp:TemplateField>
            <%--  <asp:BoundField DataField="Other" HeaderText="备注" ItemStyle-Width="30%" />--%>
            <asp:TemplateField HeaderText="备注" ItemStyle-Width="30%">
                <ItemTemplate>
                    <a href="javascript:void(0)" title='<%#Eval("Other").ToString()%>'>
                        <%#Eval("Other").ToString().Length > 45 ? Eval("Other").ToString().Substring(0, 40) + "......." : Eval("Other").ToString()%></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="DateTime" HeaderText="时间" ItemStyle-Width="20%" DataFormatString="{0:yyyy-MM-dd}" />
            <asp:BoundField DataField="USER_NAME" HeaderText="用户名" ItemStyle-Width="20%" />
        </Columns>
        <PagerTemplate>
            <table width="100%">
                <tr>
                    <td style="text-align: center">
                        第<asp:Label ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />页
                        共<asp:Label ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' />页
                        <asp:LinkButton ID="btnFirst" runat="server" CausesValidation="False" CommandArgument="First"
                            CommandName="Page" Text="首页" />
                        <asp:LinkButton ID="btnPrev" runat="server" CausesValidation="False" CommandArgument="Prev"
                            CommandName="Page" Text="上一页" />
                        <asp:LinkButton ID="btnNext" runat="server" CausesValidation="False" CommandArgument="Next"
                            CommandName="Page" Text="下一页" />
                        <asp:LinkButton ID="btnLast" runat="server" CausesValidation="False" CommandArgument="Last"
                            CommandName="Page" Text="尾页" />
                        <asp:TextBox ID="txtNewPageIndex" runat="server" Width="28px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />
                        <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                            CommandName="Page" Text="GO" /><!-- here set the CommandArgument of the Go Button to '-1' as the flag -->
                    </td>
                </tr>
            </table>
        </PagerTemplate>
        <FooterStyle CssClass="GridViewFooterStyle" />
        <RowStyle CssClass="GridViewRowStyle" />
        <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
        <PagerStyle CssClass="GridViewPagerStyle" />
        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
        <HeaderStyle CssClass="GridViewHeaderStyle" />
    </asp:GridView>
    </form>
</body>
</html>
